package gupao.concurrency.simpledemo.controller;

import gupao.concurrency.simpledemo.model.BizProcessResult;
import gupao.concurrency.simpledemo.model.CommonResponse;
import gupao.concurrency.simpledemo.service.BizService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IssueReplayController {

    @Autowired
    private BizService bizService;

    @GetMapping("/hello")
    public String hello(){
        return "hello";
    }

    @GetMapping("/replay")
    public String doSth(){
        BizProcessResult<?> rt = bizService.aggregateProcess();
        return CommonResponse.successResponse(rt);
    }

}
